let info = {
    name: 'yimwu',
    tel: '134xxxxx320',
    address: {
        home: 'jy',
        company: 'gz'
    }
}

let infoCopy = JSON.parse(JSON.stringify(info))
infoCopy.name = "zhuhaoran"
infoCopy.address.home = "安徽"
console.log(info)  //不改变
console.log(infoCopy)  //改变

/*

{
  name: 'yimwu',
  tel: '134xxxxx320',
  address: { home: 'jy', company: 'gz' }
}
{
  name: 'zhuhaoran',
  tel: '134xxxxx320',
  address: { home: '安徽', company: 'gz' }
}

*/

//缺点: 无法实现对对象中方法的深拷贝，会显示为undefined